package com.tg.uml;

import net.sourceforge.plantuml.SourceFileReader;
import net.sourceforge.plantuml.SourceStringReader;

import java.io.File;
import java.io.IOException;
import java.io.OutputStream;

public class PlantumlTest {
    public static void main(String[] args){
        try
        {
            File ne =new File("D:\\abac.png");
            String source = "@startuml\n";
            source += "Bob -> Alice : hello\n";
            source += "@enduml\n";

            SourceStringReader reader = new SourceStringReader(source);
// Write the first image to "png"
            String s = reader.generateImage(ne);
            System.out.println(s);
        }
        catch (IOException ex){

        }

    }
}
